<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="com.fg.model.ProductVO, java.util.Map, java.util.List" %>

<%
String imagePath = "https://freegive-uploaded-files.s3.amazonaws.com/images/";
Map resultMap = (Map)request.getAttribute("resultMap");
List<ProductVO> product_list = (List)resultMap.get("product_list");
%>
    
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Index Page</title>

<link rel="stylesheet" type="text/css" media="all" href="/css/common.css">
<link rel="stylesheet" type="text/css" media="all" href="/css/main.css">


<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script type="text/javascript" src="/js/jquery.form.js"></script>
<script type="text/javascript" src="/js/common.js"></script>
<script type="text/javascript" src="/js/main.js"></script>




</head>


<body>

<div class="container">
	<jsp:include page="view/viewHeader.jsp" flush="true"/>
	<div class="introduce_div" style="width: 100%; height:450px;">
		<div class="introduce_top" style="height:400px; background: #ddd;">
			<div class="top_left" style="float:left; margin-left: 170px;">
				<div class="top_1 top" style="width:600px; height:350px;padding:30px;">	
					<iframe src="http://player.vimeo.com/video/27675777?title=0&amp;byline=0&amp;portrait=0" width="600" height="350" frameborder="0"></iframe>
				</div>
				<div class="top_2 top" style="display: none;">
					<img src="/image/벅스.jpg" width="600px" height="350px">
				</div>
				<div class="top_3 top" style="display: none;">
					<img src="/image/옷.jpg" width="600px" height="350px">
				</div>
				<div class="top_4 top" style="display: none;">
					<img src="image/우산.jpg" width="600px" height="350px">
				</div>
			</div>
			<div class="top_right" style="float:left; margin-top:350px;">
				<input type="button" value="1" onclick="$('.top').css('display','none'); $('.top_1').css('display', 'block');"/>
				<input type="button" value="2" onclick="$('.top').css('display','none'); $('.top_2').css('display', 'block');"/>
				<input type="button" value="3" onclick="$('.top').css('display','none'); $('.top_3').css('display', 'block');"/>
				<input type="button" value="4" onclick="$('.top').css('display','none'); $('.top_4').css('display', 'block');"/>
			</div>
			<div class="clear"></div>
		</div>
		<div class="introduce_bottom" style="height:40px; padding: 15px 20px 0px 20px;">
			<div class="account" style="float: left;padding-left: 15px;padding-top: 10px;">
				<a href="#">GIFT 순</a>&nbsp;<font color="lightSlateGray">|</font>&nbsp;
				<a href="#">POINT 순</a>
			</div>
			<input class="post_button" type="button" value="선물주기" onclick="window.location='/enroll.action';"/>
		</div>
	</div>
	
	<div class="product_list_div">
	
		<%if(product_list.size() > 0){
			for(ProductVO product : product_list){%>
				<div class="product_container" onclick="window.location='loadProduct.action?product_seq=<%=product.getProduct_seq()%>';">
					<div class="product_top">
						<%if(product.getImage_list() != null){ %>
							<img src="<%=imagePath+product.getImage_list().get(0).getImage_path()%>" style="width: 94%; height: 100%">
						<%}else{ %>
							<img src="image/no_photo.jpg" style="width: 94%; height: 100%">
						<%}%>
						<div class="product_status">
							<%if(product.getRegist_type().equals("선물")){ %>
								<img src="image/s_gift.png" style="width: 80px; height: 60px">
							<%}else if(product.getRegist_type().equals("포인트")){ %>
								<img src="image/s_point.png" style="width: 80px; height: 60px">
							<%} %>
						</div>
					</div>
					<div class="product_bottom">
						<div class="product_name">
							<%=product.getP_name() %>
						</div>
						<div class="product_point">
							<%if(product.getRegist_type().equals("선물")){ %>
								선물
							<%}else if(product.getRegist_type().equals("포인트")){ %>
								P&nbsp;<%=product.getP_point() %>
							<%} %>
						</div>
					</div>
				</div>
			<%}
		}%>
		<div class="product_more" style="text-align:center;float:left; width: 100%; height:40px; cursor: pointer; background: #FBEECB;"
		onclick="moreProductList()">
			<div style="padding-top:10px;">더 보기</span>
		</div>
		<div class="clear"></div>
	</div>
	<div class="clear">
	</div>
</div>





</body>
</html>